package com.leshan.lwm2m.californium;

/**
 *
 * send 资源
 *
 * @author pengyu
 * @Date 2019/9/20
 * @Description
 */

import org.eclipse.californium.core.server.resources.CoapExchange;
import org.eclipse.californium.core.server.resources.Resource;
import org.eclipse.leshan.core.californium.LwM2mCoapResource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * A CoAP {@link Resource} in charge of handling clients registration requests.
 * <p>
 * This resource is the entry point of the Resource Directory ("/dp"). Each new client is added to the
 * {@link }.
 * </p>
 */

public class SendResource extends LwM2mCoapResource {

    private static final Logger logger = LoggerFactory.getLogger(SendResource.class);

    public static final String RESOURCE_NAME = "dp";

    public SendResource() {
        super(RESOURCE_NAME);
    }

    /**
     * 处理send请求
     * @param exchange
     */
    @Override
    public void handlePOST(CoapExchange exchange) {
        logger.info("send请求: "+ exchange);

        super.handlePOST(exchange);

    }
}

